Skip to content

upgrade: upload package upgrade for Solid 2.0#846

Draft
davedbase wants to merge 3 commits intosolidjs-community:nextfrom
davedbase:update/v2/upload
Draft

upgrade: upload package upgrade for Solid 2.0#846
davedbase wants to merge 3 commits intosolidjs-community:nextfrom
davedbase:update/v2/upload

Conversation

@davedbase
Copy link
Copy Markdown
Member

Updates the upload primitive to target Solid.js 2.0 with improved error handling.

  • isServer imported from @solidjs/web (moved out of solid-js/web)
  • createDropzone: onMount/onCleanup replaced with direct listener attachment in setRef using getOwner/runWithOwner for cleanup
  • fileUploader moved to its own file (src/fileUploader.ts) and converted to a ref callback factory
  • @solid-primitives/utils dependency removed (inlined the one usage)
  • Both createFileUploader and createDropzone now expose an error: Accessor<unknown> signal that captures callback rejections reactively
  • fileUploader accepts an optional onError callback; without it, rejections propagate as unhandled
  • Tests expanded from 1 to 19 covering initialisation, mutations, error paths, and event dispatch

Breaking changes:

  • use:fileUploader directive removed — use ref={fileUploader(opts)} instead
  • Requires solid-js@^2.0.0-beta.7 and @solidjs/web@^2.0.0-beta.7

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 21, 2026

🦋 Changeset detected

Latest commit: 3af985e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solid-primitives/upload Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@davedbase davedbase changed the base branch from main to next April 21, 2026 01:47
@davedbase davedbase added this to the Solid 2.0 Upgrade milestone Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant